package reply

// UnknownErrReply
type UnknownErrReply struct{}
func (r *UnknownErrReply) ToBytes() []byte {
	return []byte("-Err unknown\r\n")
}
func (r *UnknownErrReply) Error() string {
	return "Err unknown"
}
// ArgNumErrReply
type ArgNumErrReply struct{
	Cmd string
}
func (r *ArgNumErrReply) ToBytes() []byte {
	return []byte("-ERR wrong number of arguments for '" + r.Cmd + "' command\r\n")
}
func (r *ArgNumErrReply) Error() string {
	return "ERR wrong number of arguments for '" + r.Cmd + "' command"
}
func MakeArgNumErrReply(cmd string) *ArgNumErrReply  {
	return &ArgNumErrReply{Cmd:cmd}
}

// SyntaxErrReply
type SyntaxErrReply struct{}
func MakeSyntaxErrReply() *SyntaxErrReply {
	return &SyntaxErrReply{}
}
func (r *SyntaxErrReply) ToBytes() []byte {
	return []byte("-Err syntax error\r\n")
}
func (r *SyntaxErrReply) Error() string {
	return "Err syntax error"
}

// WrongTypeErrReply
type WrongTypeErrReply struct{}
func (r *WrongTypeErrReply) ToBytes() []byte {
	return []byte("-WRONGTYPE Operation against a key holding the wrong kind of value\r\n")
}
func (r *WrongTypeErrReply) Error() string {
	return "WRONGTYPE Operation against a key holding the wrong kind of value"
}

// ProtocolErrReply
type ProtocolErrReply struct {
	Msg string
}
func (r *ProtocolErrReply) ToBytes() []byte {
	return []byte("-ERR Protocol error: '" + r.Msg + "'\r\n")
}
func (r *ProtocolErrReply) Error() string {
	return "ERR Protocol error: '" + r.Msg
}








